package com.cjj.backend.admin.controller;

import com.cjj.common.facade.UserFacadeService;
import com.cjj.common.entity.Res;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author by BrownC_
 * @date 2021/12/20 16:56:32
 * @email ccc-ju@outlook.com
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/user")
public class UserController {

    private final UserFacadeService userFacadeService;

    @GetMapping("/userInfo/{id}")
    public Res getUserInfo(@PathVariable @ApiParam(value = "id", required = true) Long id){
        return Res.success(userFacadeService.getUserInfo(id));
    }

}
